package com.dcbeida.adapter;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.dcbeida.activity.clerkmanager.AccountListFragment;

public class AccountPageAdapter extends FragmentStatePagerAdapter {

    public AccountPageAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        Fragment fragment = new AccountListFragment();
        Bundle bundle = new Bundle();
        if(position ==0){
            bundle.putInt("type",1);
        }else {
            bundle.putInt("type",0);
        }
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public int getCount() {
        return 2;
    }
}
